package com.zh.room;
import java.util.ArrayList;

/**
 * @description:
 * @author: zhangHang
 * @date: Created in 2020/5/20 23:12
 * @version: V1.0
 * @modified By:
 */
public class RoomSet {
    public ArrayList<Room> rooms = new ArrayList<>();
    private String id;
    private String description;

    public void addRoom(Room room){
        rooms.add(room);
    }
    public Room searchRoomById(String id){
        Room room = null;
        for (Room item:rooms) {
            if(item.getId().equals(id)){
                room=item;
                break;
            }
        }
        return room;
    }

    public ArrayList<Room> getRooms(){
        return rooms;
    }

    public void setRooms(ArrayList<Room> rooms){
        this.rooms = rooms;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
